package agile.hustler.Characters;

import java.util.Scanner;

/**
 * @(#)Text1.java
 * 
 * 
 * @author
 * @version 1.00 2010/4/21
 */

public class CharacterType {

	public String name = "";
	public int level;
	public int luck;
	public int effekt;
	public int money = 500;
	public int XP = 0;
	public double hp;
	public int actionPoint;
	String charType = "";
	
	public String getHP() {
		return Integer.toString((int)hp);
	}
	
	public String getXP() { return Integer.toString((int)XP); }
	
	public String getMoney() { return Integer.toString((int)money); }
	
	public int getMoneyInt() { return money;  }
	
	public String getEffect() { return Integer.toString((int)effekt); }
	
	public String getLuck() { return Integer.toString((int)luck); }
	
	public String getLevel() { return Integer.toString((int)level); }
	
	public String getName() { return name; }
	
	public String getActionPoint() { return Integer.toString((int)actionPoint); }
	
	public double getHPf() { return hp; }
	public double getXPf() { return XP; }
	
	
	
	
	public void updateLevel(int l){		
		
	}
	public void updateMoney(int m)
	{
	   money += m;
	}
	public void updateXP(int x)
	{
		XP += x;
	}
	public void updateLuck(int l)
	{
	   
	}
	public void updateEffect(int e)
	{
	
	}
	
	public void updateHP(int h)
	{
	
	}
	
	public void resetHP(double HP)
	{
		hp = HP;
	}
	public void fromString(String s) {
		Scanner scanner = new Scanner(s);
		scanner.useDelimiter(" ");
		while (scanner.hasNext()) {
			charType = scanner.next();
			name = scanner.next();
			level = Integer.parseInt(scanner.next());
			actionPoint = Integer.parseInt(scanner.next());
			luck = Integer.parseInt(scanner.next());
			effekt = Integer.parseInt(scanner.next());
			hp = Float.parseFloat(scanner.next());
			XP = Integer.parseInt(scanner.next());
			money = Integer.parseInt(scanner.next().trim());
		}

	}
	public int getNextLevel() {
		return 100*(int)Math.ceil(Math.pow(level,2)/2.0);
	}
}